#pragma once
#include <ClanLib/display.h>
#include <vector>

#ifndef __gameconstants
#include "gameconstants.h"
#define __gameconstants
#endif

class Player {
public:
	Player(CL_Sprite* image, std::vector<CL_Sprite*>* animation);
	~Player(void);

	CL_Sprite* getPlayerImage();
	CL_Sprite* getPlayerAnimatedImage();
	int getLifes();
	void setLifes(int x);
	int getHitpoints();
	int getScore();
	void setScore(int x);
	float getPosX();
	float getPosY();
	void setPosX(float x);
	void setPosY(float y);

	void setHasHabanero(bool b);
	bool getHasHabanero();

	void setHabaneroTimer(int i);
	int getHabaneroTimer();

	void setIsDead(bool b);
	bool getIsDead();

	void setDeathTimer(int i);
	int getDeathTimer();

	PlayerDirection::PlayerDirection getPlayerState();
	void setPlayerState(PlayerDirection::PlayerDirection state);
	PlayerDirection::PlayerDirection getLastPlayerDirection();
	void setLastPlayerDirection(PlayerDirection::PlayerDirection state);

	void setPlayerGraphics_mirrored(CL_Sprite* image,
			std::vector<CL_Sprite*>* animation);
	CL_Sprite* getPlayerImage_mirrored();
	CL_Sprite* getPlayerAnimatedImage_mirrored();

private:
	int lifes;
	int hitpoints;
	int score;

	bool hasHabanero;
	int habaneroTimer;

	bool isDead;
	int deathTimer;

	// bild biem stehen
	CL_Sprite* playerImage;
	// bilder fuer gehanimation
	std::vector<CL_Sprite*>* playerAnimation;

	// bild beim stehen
	CL_Sprite* playerImage_mirrored;
	// bilder fuer mirror gehanimation
	std::vector<CL_Sprite*>* playerAnimation_mirrored;

	int currentFrame;

	// derzeitige position im level
	float posX;
	float posY;
	PlayerDirection::PlayerDirection lastPlayerDirection;
	PlayerDirection::PlayerDirection playerState;
};
